<template>
	<view class="go-1">
		<swiper class="im-1">
			<swiper-item>
				<image class="im-1" src="../../static/go/go-1.png" mode=""></image>
			</swiper-item>
			<swiper-item class="im-2">
				<image class="im-3" src="../../static/go/go-2.png" mode=""></image>
				<navigator @click="time=0"  hover-class="none" class="goo-1" open-type="switchTab" url="/pages/home/Home">立即体验
				</navigator>
			</swiper-item>
		</swiper>
		<navigator @click="time=0" hover-class="none" class="goo-2" open-type="switchTab" url="/pages/home/Home">
			<view class="wz-1">
				<text>跳过</text>
			</view>

			<view class="wz-2">
				{{time}}
			</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				time: 5
			}
		},
		mounted() {

			this.timd()
		},
		methods: {
			
			timd() {
				var tz = setInterval(() => {
					if (this.time > 0) {
						this.time--
					} else if (this.time == 0) {
						clearInterval(tz)
						uni.switchTab({
							url: `/pages/home/Home`
						})
					}
				}, 1000)
			},
		}
	}
</script>

<style scoped lang="scss">
	.go-1 {
		position: relative;
		width: 750rpx;
		height: 100vh;

		.im-1 {
			width: 100%;
			height: 100%;

		}

		.im-2 {
			position: relative;
			width: 100%;
			height: 100%;

			.im-3 {
				position: absolute;
				width: 100%;
				height: 100%;
				z-index: -1;
			}

			.goo-1 {
				position: absolute;
				text-align: center;
				line-height: 100rpx;
				border-radius: 25rpx;
				background-color: #3874f6;
				width: 80%;
				height: 100rpx;
				bottom: 9%;
				left: 10%;
				font-size: 35rpx;
				color: #FFFFFF;
				font-weight: 700;

			}
		}

		.goo-2 {
			position: absolute;
			top: 80rpx;
			right: 10rpx;
			width: 30%;
			line-height: 70rpx;
			text-align: center;
			height: 70rpx;
			display: flex;
			border-radius: 50rpx;
			background-color: #FFFFFF;

			.wz-1 {
				font-size: 30rpx;
				font-weight: 700;
				color: #007AFF;
				width: 60%;
				height: 100%;
				border-right: 1px solid #007AFF;

			}

			.wz-2 {
				color: #007AFF;
				font-size: 30rpx;
				font-weight: 700;
				width: 40%;
				height: 100%;
			}
		}
	}
</style>
